/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.knolle.menu;

import java.util.List;

/**
 *
 * @author marcelo
 */
public class MenuItems {
    
    List<Menu> menuList;
    
    public List<Menu> getItems(){
       return menuList;
    }
    
    public Menu getObject (Integer index){
        if (menuList == null){
           return null;
        }
        return menuList.get(index);
    }
    
    public Boolean hasObject(Menu item){
       if (menuList.contains(item)){
           return Boolean.TRUE;
       }
       return Boolean.FALSE;
    }
    
    public Integer getSize(){
       if (menuList == null){
          return 0;
       }
       return menuList.size();
    }
    
    public void add(Menu item){
        menuList.add(item);
    }
    
    public void remove(Menu item){
       if (menuList.equals(item)){
           menuList.remove(item);
       }
    }
    
}
